package itesm.coler.data;

import itesm.coler.models.Session;
import java.util.ArrayList;

public interface SessionDAO {

	 /**
     * Returns a list of all sessions from the database ordered by sessionId. The list is never null and
     * is empty when the database does not contain any word.
     * @return A list of all sessions from the database ordered by sessionId.
     * @throws DAOException If something fails at database level.
     */
	public ArrayList<Session> findAll();
	
	 /**
     * Returns a list of all sessions from the database of a given problem ordered by user ID. The list is never null and
     * is empty when the database does not contain any session.
     * @param problemId: The problemId of the problem associated to this session.
     * @return A list of all sessions from the database ordered by session ID.
     * @throws DAOException If something fails at database level.
     */
    public ArrayList<Session> findAllByProblem(int problemId) throws DAOException;
    
    /**
     * Create the given session in the database and assign it to a given problem. The wordId must be unique, otherwise it will throw
     * IllegalArgumentException.  
     * @param session The session to be created in the database.
     * @param problemId The problemId associated to the session belongs
     * @throws IllegalArgumentException If the sessionId exists
     * @throws DAOException If something fails at database level.
     */
//	  public int insertSession(Session session) throws IllegalArgumentException, DAOException;

	
}
